Core Java - Interview Questions and Answers for 'File handling' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Rating

   
 Q31. Name few File IO related classes and interfaces ?Core Java
Ans. http://www.buggybread.com/2015/01/java-file-io-classes-and-interfaces.html

  Sample Code for File

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   io   input output   file io  file handling


Related Questions

  What is a stream and what are the types of Streams and classes of the Streams?
  Tell something about BufferedWriter ? What are flush() and close() used for ?
  What is Scanner class used for ? when was it introduced in Java ?
  What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
  What is the purpose of the System class?
  Difference between Scanner and BufferedReader ? Which one is faster and Why ?
  Which of the following is true ?
 How and when the Buffer is cleared when using Buffered Writer Classes ?
 How does encoding affect using Reader / writer classes or Stream classes in Java ?


 Q32. Difference between Scanner and BufferedReader ? Which one is faster and Why ?Core Java
Ans. Scanner is used for parsing tokens from the contents of the stream while BufferedReader just reads the stream.

BufferedReader read files efficiently by using a buffer to avoid physical disk operations.

Buffer size of Scanner is usually smaller than the Buffered Writer.

BufferedReader is faster that Scanner as it just reads the Stream and doesn't Parse the tokens to read the stream into primitive data types.

  Sample Code for Scanner

  Sample Code for BufferedReader

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   file io   input output   scanner   bufferedreader  file handling


Related Questions

  What is a stream and what are the types of Streams and classes of the Streams?
  What are the contents of Hibernate configuration file ( hibernate.cfg.xml ) ?
 Which of the following file is called deployment descriptor ?

a. application.xml
b. project.xml
c. web.xml
d. build.xml
 Within AWS S3, Why new files are available immediately for read operation but not the updates ?
  What is the purpose of dialect configured in Hibernate configuration file ?
  What are the configuration files in Hibernate ?
  Can we generate Java Documentation using Export -> JavaDoc using a jar file ?
  Name few File IO related classes and interfaces ?
 What are the ways in which an application can maintain config variables ?
  Tell something about BufferedWriter ? What are flush() and close() used for ?


previous 30   

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: